Skip to content

Conversation

@npal-cy
Copy link
Contributor

@npal-cy npal-cy commented Nov 8, 2024

Boards: cyw20829: add custom flashloaded with 64k of erase block size

  • Add custom flashloaded (for openocd) with 64k of erase block size. Default one has 512, which cause MCUbootloader overwrite during flash primary application.

soc: cyw20829: add support of Secure LCS

  • Enable support of SECURE LCS stage. In this stage, the protection
    state is set to “secure”. A secured device will boot only when the authentication of its flash boot and application code succeeds.

soc: cyw20829: Initial integrate Cypress MCUBoot for 20829

  • Added custom mcuboot cmake for sign/encrypt by using cysecuretools.

@zephyrbot zephyrbot added the platform: Infineon Infineon Technologies AG label Nov 8, 2024
@zephyrbot zephyrbot requested review from ifyall and talih0 November 8, 2024 08:56
@npal-cy npal-cy force-pushed the topic/update_cyw20829_integration branch from b305e9f to 97f4a22 Compare November 8, 2024 10:30
@npal-cy npal-cy force-pushed the topic/update_cyw20829_integration branch from 97f4a22 to 881bb90 Compare November 11, 2024 22:33
@npal-cy
Copy link
Contributor Author

npal-cy commented Nov 11, 2024

Hi @carlescufi,

Binary file not allowed: boards/infineon/cyw920829m2evk_02/support/CYW208xx_SMIF_64K.FLM
Error: See https://docs.zephyrproject.org/latest/contribute/guidelines.html#coding-style for more details.

we added openocd flashloader (boards/infineon/cyw920829m2evk_02) and Compliance Checks fail as binary file not allowed.
Does Binary file rules also applies for openocd flashloader?

Regards,
Nazar

@npal-cy npal-cy force-pushed the topic/update_cyw20829_integration branch 6 times, most recently from 17013c3 to b1bd9df Compare November 13, 2024 14:57
@npal-cy npal-cy force-pushed the topic/update_cyw20829_integration branch 3 times, most recently from 7105457 to 0501d89 Compare November 21, 2024 08:32
@npal-cy npal-cy force-pushed the topic/update_cyw20829_integration branch from 0501d89 to c70347d Compare December 10, 2024 15:20
@zephyrbot
Copy link

zephyrbot commented Dec 10, 2024

The following west manifest projects have changed revision in this Pull Request:

Name Old Revision New Revision Diff

All manifest checks OK

Note: This message is automatically posted and updated by the Manifest GitHub Action.

@npal-cy npal-cy force-pushed the topic/update_cyw20829_integration branch from c70347d to 224f48f Compare December 10, 2024 15:38
@zephyrbot zephyrbot added the DNM This PR should not be merged (Do Not Merge) label Dec 10, 2024
@npal-cy npal-cy force-pushed the topic/update_cyw20829_integration branch 7 times, most recently from 7f37a95 to 8109c99 Compare December 11, 2024 13:50
@github-actions github-actions bot removed manifest-hal_infineon DNM (manifest) This PR should not be merged (controlled by action-manifest) labels Apr 17, 2025
@sreeramIfx sreeramIfx force-pushed the topic/update_cyw20829_integration branch 2 times, most recently from 544d5d5 to 9916b14 Compare April 18, 2025 17:52
@sreeramIfx sreeramIfx force-pushed the topic/update_cyw20829_integration branch 3 times, most recently from e714793 to ffd79a1 Compare May 13, 2025 04:59
@sreeramIfx
Copy link
Contributor

@nordicjm Please review

@nordicjm
Copy link
Contributor

@nordicjm Please review

You should click the re-request review buttons next to the names in the review list, otherwise this comment could get easily missed like just now when I lost this PR and suddenly remembered then had to search through every PR I've reviewed looking for "cy" to find it

Comment on lines 29 to 43
config CYW20829_FLASH_SAHB_ADDR
hex
default $(dt_nodelabel_reg_addr_hex,flash_sahb)

config CYW20829_FLASH_CBUS_ADDR
hex
default $(dt_nodelabel_reg_addr_hex,flash_cbus)

config CYW20829_SRAM_SAHB_ADDR
hex
default $(dt_nodelabel_reg_addr_hex,sram_sahb)

config CYW20829_SRAM_CBUS_ADDR
hex
default $(dt_nodelabel_reg_addr_hex,sram_cbus)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these need to move to Kconfig file as they have no use in sysbuild (and there is no devicetree even)

Copy link
Contributor

@nordicjm nordicjm May 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not resolved (fix in original commit, no fixup commits)


if(CONFIG_INFINEON_SECURE_LCS OR CONFIG_BOOTLOADER_MCUBOOT)
# Check cysecuretools
find_program(CYSECURETOOLS cysecuretools)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should just use the required flag in find_program() rather then re-inventing the wheel

Comment on lines 63 to 64
${CONFIG_INFINEON_SECURE_POLICY}
${default_policy_name}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 space indent not 4 for cmake

)

if(NOT default_policy)
message(FATAL_ERROR "Can't find policy:${CONFIG_INFINEON_SECURE_POLICY}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing space after :

The following configuration options can be used to build for a device which has been provisioned
to SECURE LCS and configured to use an encrypted flash interface:

- ``CONFIG_INFINEON_SECURE_LCS=y``: Enable if the target device is in SECURE LCS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use

:kconfig:option:`CONFIG_blah...`

and just say to set them not with the =blah part, so that they have links to the actual Kconfig descriptions

:west-args: -p always
:gen-args: -DCONFIG_BOOTLOADER_MCUBOOT=y -DCONFIG_MCUBOOT_SIGNATURE_KEY_FILE=\"/path/to/cypress/mcuboot/boot/cypress/keys/cypress-test-ec-p256.pem\"

If you use ``CONFIG_MCUBOOT_ENCRYPTION_KEY_FILE`` to generate an encrypted image then the final
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as above

@sreeramIfx
Copy link
Contributor

@nordicjm Please review

You should click the re-request review buttons next to the names in the review list, otherwise this comment could get easily missed like just now when I lost this PR and suddenly remembered then had to search through every PR I've reviewed looking for "cy" to find it

I am not seeing that button on this PR, Probably because I was not the initial author of this PR?
image

@ifyall ifyall requested a review from nordicjm May 14, 2025 20:59
@sreeramIfx sreeramIfx force-pushed the topic/update_cyw20829_integration branch 3 times, most recently from 16dd263 to 80341d3 Compare May 14, 2025 22:53
Add custom flashloader (for openocd) with 64k of erase block size.
Default one has 512, which cause MCUbootloader overwrite during flash
primary application.

Signed-off-by: Sreeram Tatapudi <[email protected]>
@sreeramIfx sreeramIfx force-pushed the topic/update_cyw20829_integration branch 4 times, most recently from 825575f to 24b1b1a Compare May 20, 2025 00:15
Instead of using app_header.c generate the app header using python
script and merge with final binary post build

Signed-off-by: Sreeram Tatapudi <[email protected]>
@sreeramIfx sreeramIfx force-pushed the topic/update_cyw20829_integration branch from 24b1b1a to 017a2b0 Compare May 20, 2025 23:41
Enable support of SECURE LCS stage. In this stage, the protection
state is set to “secure”. A secured device will boot only when the
authentication of its flash boot and application code succeeds

Signed-off-by: Sreeram Tatapudi <[email protected]>
Added custom mcuboot cmake for sign/encrypt by using cysecuretools

Signed-off-by: Sreeram Tatapudi <[email protected]>
Signed-off-by: Nazar Palamar <[email protected]>
@sreeramIfx sreeramIfx force-pushed the topic/update_cyw20829_integration branch from 017a2b0 to 0204cd2 Compare May 21, 2025 18:24
@sonarqubecloud
Copy link

Copy link
Contributor

@kartben kartben left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doc changes look ok - thanks!

@kartben kartben merged commit c4866ec into zephyrproject-rtos:main May 24, 2025
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

platform: Infineon Infineon Technologies AG

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants